

using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using Yozeev.BusinessLogic;

namespace Yozeev.EntityMapper.Sources
{
    public class SourceCfg : IEntityTypeConfiguration<Source>
    {
        public void Configure(EntityTypeBuilder<Source> builder)
        {

            builder.ToTable("Sources", YoYoAbpefCoreConsts.SchemaNames.Common);

            
			builder.Property(a => a.SourceName).HasMaxLength(YoYoAbpefCoreConsts.EntityLengthNames.Length64);
			builder.Property(a => a.SourceCode).HasMaxLength(YoYoAbpefCoreConsts.EntityLengthNames.Length64);
            builder.Property(a => a.Discount).HasMaxLength(YoYoAbpefCoreConsts.EntityLengthNames.Length64).HasDefaultValue(1);
            builder.Property(a => a.RDiscount).HasMaxLength(YoYoAbpefCoreConsts.EntityLengthNames.Length64).HasDefaultValue(1);


        }
    }
}


